import { Injectable, OnModuleInit } from '@nestjs/common'
import { PrismaClient } from '@prisma/client'

@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
  constructor() {
    super({
      log: ['error'],
      omit: {
        // user: {
        //   password: true,
        // },
      },
    })
  }
  async onModuleInit() {
    await this.$connect()
  }
}
